package ooday01;
/**老师类*/
public class Teacher extends Person{
    double salary;
    Teacher(){
    }
    Teacher(String name,int age,String address,double salary){
        super.name = name;//访问父类的属性
        super.age = age;
        super.address = address;
        this.salary = salary;//访问子类的属性
    }
    void teach(){
        System.out.println(name+"在讲课...");
    }

}
